package com.cn.mmd.service;

import com.cn.mmd.mapper.ActivityMapper;
import com.cn.mmd.mapper.StudentActivityMapper;
import com.cn.mmd.model.Activity;
import com.cn.mmd.model.StudentActivity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/7/15 0015.
 */

@Service("studentActivityService")
public class StudentActivityServiceImpl implements StudentActivityService {

    @Autowired
    private ActivityMapper activityMapper;

    @Autowired
    private StudentActivityMapper studentActivityMapper;

    @Override
    public List<Activity> selectByActivityName(Activity activity) {
        return activityMapper.selectByActivityName(activity);
    }

    @Override
    public int updateByPrimaryKeySelective(Activity record) {
        return activityMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int insertSelective(StudentActivity record) {
        return studentActivityMapper.insertSelective(record);
    }

    @Override
    public int countByAll(StudentActivity studentActivity) {
        return studentActivityMapper.countByAll(studentActivity);
    }

    @Override
    public Activity selectByPrimaryKey(Integer activityid) {
        return activityMapper.selectByPrimaryKey(activityid);
    }

    @Override
    public List<StudentActivity> countById(StudentActivity studentActivity) {
        return studentActivityMapper.countById(studentActivity);
    }

    @Override
    public StudentActivity countByIdsId(StudentActivity studentActivity) {
        return studentActivityMapper.countByIdsId(studentActivity);
    }
}
